#include<stdio.h>
#include<pthread.h>
pthread_mutex_t mut;//互斥锁

void* Routine(void* args)
{
    pthread_mutex_lock(&mut);
    pthread_mutex_lock(&mut);
}

int main()
{
    pthread_t tid;
    pthread_mutex_init(&mut,NULL);//初始化互斥锁
    pthread_create(&tid,NULL,Routine,NULL);//创建新线程
    pthread_join(tid,NULL);//等待新线程
    pthread_mutex_destroy(&mut);//释放互斥锁
    return 0;
}
